package com.bitoon.basketdudes.web.jpa;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class TemporadaTrofeoPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "temporada_id")
    private int temporadaId;
    @Basic(optional = false)
    @Column(name = "trofeo_id")
    private int trofeoId;
    @Basic(optional = false)
    @Column(name = "posicion")
    private short posicion;

    public TemporadaTrofeoPK() {
    }

    public TemporadaTrofeoPK(int temporadaId, int trofeoId, short posicion) {
        this.temporadaId = temporadaId;
        this.trofeoId = trofeoId;
        this.posicion = posicion;
    }

    public int getTemporadaId() {
        return temporadaId;
    }

    public void setTemporadaId(int temporadaId) {
        this.temporadaId = temporadaId;
    }

    public int getTrofeoId() {
        return trofeoId;
    }

    public void setTrofeoId(int trofeoId) {
        this.trofeoId = trofeoId;
    }

    public short getPosicion() {
        return posicion;
    }

    public void setPosicion(short posicion) {
        this.posicion = posicion;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) temporadaId;
        hash += (int) trofeoId;
        hash += (int) posicion;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TemporadaTrofeoPK)) {
            return false;
        }
        TemporadaTrofeoPK other = (TemporadaTrofeoPK) object;
        if (this.temporadaId != other.temporadaId) {
            return false;
        }
        if (this.trofeoId != other.trofeoId) {
            return false;
        }
        if (this.posicion != other.posicion) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "paco.TemporadaTrofeoPK[temporadaId=" + temporadaId + ", trofeoId=" + trofeoId + ", posicion=" + posicion + "]";
    }

}
